package com.dx.spring6_15.annotation2.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import com.dx.spring6_15.annotation2.TestObj;
import com.dx.spring6_15.annotation2.service.UserService;

@Controller
public class UserController {

	@Autowired
	private UserService userService;
	
	@Autowired(required=false)
	private TestObj testObj;
	
	public void execute(){
		
		System.out.println("UserController execute ... ... ");
		
		userService.add();
		
		System.out.println(testObj);
		//testObj.print();
	}
}
